package com.jwtproject.bootserver.controller;


import com.baomidou.mybatisplus.plugins.Page;

import com.jwtproject.bootserver.model.User;
import com.jwtproject.bootserver.service.UserService;
import com.jwtproject.bootserver.status.ProjectStatusEnum;
import com.jwtproject.bootserver.util.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/user")
public class UserController {
    @Resource
    private UserService userService;



    @GetMapping("getpage")
    public Result getUserList(Page<User> page, User user){
        Page<User> userPage = userService.selectPage(page);
        return new Result(ProjectStatusEnum.SUCCESS,userPage);
    }
}
